package cn.hy.face.common.constant;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 项目级别常量
 */
@ConfigurationProperties(prefix = "core.config")
@Component
public class ProjectConstant {

    /**
     * 当前应用编码
     */
    public static final String APP_CODE = "huayufacemanage";

    public static final String PROJECT_NAME = "face";

    /**
     * 用户信息sessionKey
     */
    public static final String LOGIN_USER_SESSION_KEY = PROJECT_NAME + "_LOGIN_USER_KEY";

    /**
     * 当前应用访问域名
     */
    public static String hostName;

    /**
     * 文件上传路径
     */
    public static String fileUploadLocation = "/opt/upload/file";
    /**
     * 文件文件访问前缀
     */
    public static String fileVisitPrefix = "/file";
    
    /**
     * 人脸照片更新消息topic前缀
     */
    public static final String TOPIC = "/topic/";
    
    /**
     * 系统用户
     */
    public static final String SYSTEM = "SYSTEM";

    //用户信息更新
    public static final String MQTT_USER_FACE = "HY_User_Face";
    
    public void setHostName(String hostName) {
        ProjectConstant.hostName = hostName;
    }
}
